Populate Dropdown from API call
Question
You can find this question from this link 👉Dropdown menu populated from API call
Answer
You can find the solution to the question from the video below
The Parameters for the Workflow are given below

The Code Snippet is as follows
body = Map();
api_res = postUrl("https://your-website/api/category",body);
if(api_res != null)
{
json_map = api_res.toMap();
if(json_map.get("category"))
{
categories = json_map.get("category");
for each cat in categories
{
input.Category:ui.append(cat);
}
}
else
{
info "Key 'category' not found in response.";
}
}
else
{
info "API failed or returned invalid JSON. Skipping category load.";
}




